<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script src="jQuery/jquery-3.6.1.js"></script>
</head>
<body>
欢迎<span id="username"></span>登录，您当前的角色是<span id="rolename"></span>
<script>
    $(document).ready(function (){
        $("#username").text(localStorage.getItem("username"))
        $("#rolename").text(localStorage.getItem("rolename"))
    })
</script>
</body>

</html>